<template>
	<view style="height: 100%">
		<u-popup :custom-style="{
			background:'transparent'
		}" :show="show" mode='center' @close="close">
			<view class="section_1 flex-col">
				<view class="image-wrapper_1 flex-row justify-between">
					<view class="title_1">你有{{count}}笔超时占位订单待支付</view>
					<view class="icon_1">
						<view class="error" @click="close"></view>
					</view>
				</view>
				<view class="group_2 flex-col">
					<view class="title_2">{{detail.stationName}}</view>
					<text class="text_1">{{ detail.actTimeE}}</text>
					<view class="text-wrapper_1">
						<text class="text_2">超时占位时长：</text>
						<text class="text_3">{{detail.actualDuration}}分钟</text>
					</view>
					<view class="text-wrapper_2 flex-row justify-between">
						<text class="text_4">应付费用:</text>
						<text class="text_5">￥{{detail.busBalance | regFenToYuan}}</text>
					</view>
				</view>
				<button class="button_1 flex-row-center" @click="toPlaceholderOrderDetail(detail.id)">
					<text class="text_6">立即支付</text>
				</button>
				<text class="text_7" @click="close">稍后再说</text>
			</view>
		</u-popup>
	</view>
</template>
<script>
	import {
		getMyOccupyBillPage
	} from '../../api/placeholder.js';
	export default {
		components: {},
		data() {
			return {
				show:false,
				detail:{},
				count:0
			};
		},
		/**
		 * 组件的属性列表
		 */
		props: {
		},
		mounted() {

		},
		/**
		 * 组件的方法列表
		 */
		methods: {
			toPlaceholderOrderDetail(id){
					uni.navigateTo({
						url:'/orderSub/pages/placeholderOrderDetail/placeholderOrderDetail?id='+id
					})  
			},
			show_on(){
				getMyOccupyBillPage({
					// memberId:uni.getStorageSync('memberId'),
					billStatus:11,
					current:1,
					pageSize:10
				}).then(res=>{
					let records = res.data.records || []
					if(records.length){
						this.show=true
						this.detail = records[0]
						this.count = records.length
					}else{
						this.show=false
					}
				})
			},
				
			close(){
				this.show = false
			}
		},
		created: function() {
			
		}
	}
</script>
<style lang="less" scoped>
	@import '../../commin/flex.less';

	.error {
		display: inline-block;
		width: 20px;
		height: 2px;
		background: #606266;
		line-height: 0;
		font-size: 0;
		vertical-align: middle;
		-webkit-transform: rotate(45deg);
	}

	.error::after {
		content: '/';
		display: block;
		width: 20px;
		height: 2px;
		background: #606266;
		-webkit-transform: rotate(-90deg);
	}

	.section_1 {
		box-shadow: 2px 3px 14px 0px rgba(166, 171, 178, 0.141176);
		background-color: rgba(255, 255, 255, 1);
		border-radius: 16rpx;
		width: 702rpx;
		height: 628rpx;
		position: relative;

		// margin: 353rpx 0 0 24rpx;
		.image-wrapper_1 {
			width: 539rpx;
			height: 47rpx;
			margin: 32rpx 0 0 131rpx;

			.title_1 {
				height: 34rpx;
				font-size: 34rpx;
				font-weight: bold;
				color: #303133;
				line-height: 34rpx;
				margin-top: 14rpx;
			}

			.icon_1 {
				position: absolute;
				right: 20rpx;
				top: 20rpx;
				width: 40rpx;
				height: 40rpx;
			}
		}

		.group_2 {
			background-color: rgba(245, 247, 250, 1);
			width: 638rpx;
			// height: 279rpx;
			margin: 39rpx 0 0 32rpx;

			.title_2 {
				width: 567rpx;
				// height: 33rpx;
				margin: 42rpx 0 0 32rpx;
				font-weight: bold;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;

			}

			.text_1 {
				width: 251rpx;
				height: 24rpx;
				overflow-wrap: break-word;
				color: rgba(96, 98, 102, 1);
				font-size: 24rpx;
				font-family: PingFang SC-Medium;
				font-weight: 500;
				text-align: left;
				white-space: nowrap;
				line-height: 24rpx;
				margin: 29rpx 0 0 32rpx;
			}

			.text-wrapper_1 {
				width: 245rpx;
				height: 24rpx;
				overflow-wrap: break-word;
				font-size: 0;
				font-family: PingFang SC-Medium;
				font-weight: 500;
				text-align: left;
				white-space: nowrap;
				line-height: 24rpx;
				margin: 29rpx 0 0 32rpx;

				.text_2 {
					width: 245rpx;
					height: 24rpx;
					overflow-wrap: break-word;
					color: rgba(96, 98, 102, 1);
					font-size: 24rpx;
					font-family: PingFang SC-Medium;
					font-weight: 500;
					text-align: left;
					white-space: nowrap;
					line-height: 24rpx;
				}

				.text_3 {
					width: 245rpx;
					height: 24rpx;
					overflow-wrap: break-word;
					color: rgba(252, 114, 76, 1);
					font-size: 24rpx;
					font-family: PingFang SC-Medium;
					font-weight: 500;
					text-align: left;
					white-space: nowrap;
					line-height: 24rpx;
				}
			}

			.text-wrapper_2 {
				width: 241rpx;
				height: 30rpx;
				margin: 30rpx 0 38rpx 32rpx;

				.text_4 {
					width: 119rpx;
					height: 28rpx;
					overflow-wrap: break-word;
					color: rgba(96, 98, 102, 1);
					font-size: 28rpx;
					font-family: PingFang SC-Medium;
					font-weight: 500;
					text-align: left;
					white-space: nowrap;
					line-height: 28rpx;
					margin-top: 1rpx;
				}

				.text_5 {
					width: 111rpx;
					height: 30rpx;
					overflow-wrap: break-word;
					color: rgba(48, 49, 51, 1);
					font-size: 30rpx;
					font-family: PingFang SC-Bold;
					font-weight: 700;
					text-align: left;
					white-space: nowrap;
					line-height: 30rpx;
				}
			}
		}

		.button_1 {
			background-color: var(--btnColor);
			border-radius: 44px;
			height: 88rpx;
			width: 638rpx;
			margin: 40rpx 0 0 32rpx;

			.text_6 {
				width: 120rpx;
				height: 30rpx;
				overflow-wrap: break-word;
				color: rgba(255, 255, 255, 1);
				font-size: 30rpx;
				font-family: PingFang SC-Bold;
				font-weight: 700;
				text-align: center;
				white-space: nowrap;
				line-height: 30rpx;
				// margin: 30rpx 0 0 259rpx;
			}
		}

		.text_7 {
			width: 96rpx;
			height: 24rpx;
			overflow-wrap: break-word;
			color: rgba(144, 147, 153, 1);
			font-size: 24rpx;
			font-family: PingFang SC-Medium;
			font-weight: 500;
			text-align: center;
			white-space: nowrap;
			line-height: 24rpx;
			margin: 40rpx 0 39rpx 304rpx;
		}
	}

	.flex-col {
		display: flex;
		flex-direction: column;
	}
</style>